//
//  UIColor+Categories.h
//  BBUniversalFramework
//
//  Created by Mibao12 on 2020/2/10.
//  Copyright © 2020 半饱. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
// 定义一个枚举（包含了四种类型的button）
typedef NS_ENUM(NSUInteger, BBAlertActionEdgeInsetsStyle) {
    BBAlertActionEdgeInsetsStyleDefault,
    BBAlertActionEdgeInsetsStyleLeft = BBAlertActionEdgeInsetsStyleDefault, // image在左，label在右
    BBAlertActionEdgeInsetsStyleTop, // image在上，label在下
    BBAlertActionEdgeInsetsStyleBottom, // image在下，label在上
    BBAlertActionEdgeInsetsStyleRight // image在右，label在左
};

@interface UIColor(BBAlertCategories)

/// 16进制颜色转换
/// @param hexColor 16进制色值
+ (UIColor *)colorWithHex:(long)hexColor;

/// 16进制颜色转换及透明度
/// @param hexColor 16进制色值
/// @param alpha 透明度
+ (UIColor *)colorWithHex:(long)hexColor alpha:(CGFloat)alpha;

/// 随机生成颜色
+ (UIColor *)randomColor;

/// 根据系统，自动适配颜色
/// @param defaultColor 默认的颜，相当于 light
/// @param darkColor 暗黑模式颜色
+ (UIColor *)dynamicColorWithDefaultColor:(NSUInteger)defaultColor withDarkColor:(NSUInteger)darkColor;

@end

@interface UIButton (BBAlertCategories)

- (void)buttonWithEdgeInsetsStyle:(BBAlertActionEdgeInsetsStyle)edgeInsetsStyle withImageTitleSpace:(CGFloat)imageTitleSpace;
@end


@interface UIImage (BBCategories)


/// 图片切换的大小
/// @param size 切换图片后的大小
- (UIImage*)imageScaleWithSize:(CGSize)size;

@end

NS_ASSUME_NONNULL_END
